x86 Calling Conventions

Calling conventions describe how code is called in assembly. Such as:

  • The order parameters are allocated
  • How parameters are passed (pushed on stack/stored in registers)
  • Which registers the called function should preserve for the caller
  • How the task of managing the stack is divided between the caller and callee

x86-64

Microsoft x64 calling convention

vectorcall

SystemV AMD64 ABI